package com.cctc.rds.nrpc.core.util;

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;

public class PidUtils {
    private static final int PID;

    static {
        RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
        PID = Integer.parseInt(runtimeMXBean.getName().split("@")[0]);
    }

    public static int getPid() {
        return PID;
    }

}
